package com.austin.smp.service;


import com.austin.smp.common.api.ServerResponse;
import com.austin.smp.entity.User;

/**
 * @author austin
 * @since austin/6/16 16:35
 */
public interface UserService {

    //注册
    ServerResponse<String> register(User user);

    //登录
    ServerResponse<User> login(String username, String password);

    //登录注册验证
    ServerResponse<String> checkValid(String str, String type);

    //检测是否是管理员身份
    ServerResponse checkRoleAdmin(User user);

    //设置找回密码问题
    ServerResponse selectQuestion(String username);

    //设置找回密码答案
    ServerResponse<String> checkAnswer(String username, String question, String answer);

    //登陆状态下的重置密码
    ServerResponse<String> resetPassword(String passwordOld, String passwordNew, User user);

    //忘记密码的重设密码
    ServerResponse<String> forgetResetPassword(String username, String passwordNew, String forgetToken);

    //登录状态更新个人信息
    ServerResponse<User> updateInformation(User user);

    //获取用户详细信息
    ServerResponse<User> getInformation(Integer userId);

}
